package com.zhu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhu.domain.Goods;
import com.zhu.model.goods.GoodsConditionSelectVM;
import com.zhu.model.goods.GoodsInsertVM;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author JoyBoy
 * @since 2022-06-02
 */
public interface GoodsService extends IService<Goods> {
    /**
     * 功能描述 添加商品
     * @author JoyBoyZH
     * @date 2022/6/3
     * @param goods
     * @return boolean
     */
    boolean saveGoods(Goods goods);

    /**
     * 功能描述 删除商品
     * @author JoyBoyZH
     * @date 2022/6/7
     * @param goodsId
     * @return boolean
     */
    boolean deleteGoods(Integer goodsId);
    /**
     * 功能描述 通过商品id查询
     * @author JoyBoyZH
     * @date 2022/6/3
     * @param goodsId
     * @return com.zhu.domain.Goods
     */
    Goods getGoodsById(Integer goodsId);

    /**
     * 功能描述 通过商品名查询
     * @author JoyBoyZH
     * @date 2022/6/3
     * @param goodsName
     * @return com.zhu.domain.Goods
     */
    Goods getGoodsByName(String goodsName);

    /**
     * 功能描述 通过多个条件查询
     * @author JoyBoyZH
     * @date 2022/6/3
     * @param model
     * @return com.zhu.model.goods.GoodsInsertVM
     */
    Goods getGoodsByCondition(GoodsInsertVM model);


    List<Goods> getGoodsList(GoodsConditionSelectVM model);
    /**
     * 功能描述 获取所有商品
     * @author JoyBoyZH
     * @date 2022/6/3
     * @param
     * @return java.util.List<com.zhu.domain.Goods>
     */
    List<Goods> getAllGoods();
    /**
     * 功能描述 修改商品信息
     * @author JoyBoyZH
     * @date 2022/6/7
     * @param goods
     * @return boolean
     */
    boolean updateGoods(Goods goods);
}
